package com.shixi.shixitraining.shixitraining.ui.tabhome.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.shixi.shixitraining.shixitraining.ui.tabhome.fragment.JobListFragment;

/**
 * Created by shenyan on 2018/7/10.
 */

public class TrainingProjectPagerAdapter extends FragmentPagerAdapter {
    private String title[]={"综合排序","实训列表","国家"};
    public TrainingProjectPagerAdapter(FragmentManager fm) {
        super(fm);
    }
 Fragment fragment;
    @Override
    public Fragment getItem(int position) {
        if (title.equals("综合排序")){
            fragment=new JobListFragment();
        }
        return fragment;
    }

    @Override
    public int getCount() {
        return title.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return title[position];
    }
}
